/**
 * 
 */
package com.linrung.gdsfrz;

import java.io.File;

import org.apache.commons.lang3.StringUtils;
import org.springframework.core.io.FileSystemResource;

/**
 * @author 袁彬
 *
 * 2020年5月9日 上午9:45:13
 */
public class CustomerFileSystemResource extends FileSystemResource{
	private String showFileName;
	
	public CustomerFileSystemResource(File file) {
		super(file);
	}
	
	public CustomerFileSystemResource(String path, String showFileName) {
		super(path);
		this.showFileName = showFileName;
	}
	
	public CustomerFileSystemResource(File file, String showFileName) {
		super(file);
		this.showFileName = showFileName;
	}

	@Override
	public String getFilename() {
		if(StringUtils.isBlank(showFileName)) {
			return super.getFilename();
		} else {
			return showFileName;
		}
		
	}
	
	

}
